﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Skyhook.Core
{
    static public class ObjectsEngine
    {
        static IObjectsEngine Engine = null;

        static ObjectsEngine()
        {
        }

        static public void Initialize<ET>() where ET : class, IObjectsEngine, new()
        {
            Engine = new ET();
        }

        static public void CreateWorld(int width, int height)
        {
            Engine.CreateWorld(width, height);
        }

        static public void CreateView(int viewwidth, int viewheight,float tilewidth = 64.0f, float tileheight = 32.0f)
        {
            Engine.CreateView(viewwidth, viewheight, tilewidth, tileheight);
        }

        static public IObjectController CreateObject(ILogic logic, IVisual visual)
        {
            return Engine.CreateObject(logic,visual);
        }

        static public IOnScreenView OnScreenView
        {
            get
            {
                return Engine.OnScreenView;
            }
        }

        static public int ObjectsCount
        {
            get
            {
                return Engine.ObjectsCount;
            }
        }
    }
}
